import { LitElement, html, css } from 'lit';
import { customElement, property } from 'lit/decorators.js';

@customElement('my-element')
export class MyElement extends LitElement {
  static styles = css`
    :host {
      display: block;
      border: 1px solid #ccc;
      padding: 16px;
    }
    
    .title {
      color: blue;
      font-size: 1.5em;
    }
  `;

  @property({ type: String })
  name = 'World';

  render() {
    return html`
      <h1 class="title">Hello, ${this.name}!</h1>
      <p>This is a Lit Web Component.</p>
      <button @click="${this._onClick}">Click me!</button>
    `;
  }

  private _onClick() {
    this.name = 'Lit Developer';
  }
}